Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

304
Vistas
Recieving error in line "Set myshape = ActiveSheet.Shapes(Application.Caller)"

I'm using a small macro to add and delete Data field in pivotable. I have buttom assigned to Buttom, by pushining the buton I can call the field but by pushing twice it should be hidden, but it doesnt happend. One of the reason, pointed to Set myshape = ActiveSheet.Shapes(Application.Caller). Maybe I have another problems with code. Here's the code:

Sub Base_Salary()

Dim pt As PivotTable
Dim pf As PivotField
Dim sField As String
Dim myshape As Shape

Set pt = ActiveSheet.PivotTables(1)
Set myshape = ActiveSheet.Shapes(Application.Caller)
sField = myshape.TextFrame.Characters.Text

If pt.PivotFields(sField).Orientation = xlDataField Then
pt.PivotFields(sField).Orientation = xlHidden
myshape.Fill.ForeColor.Brightness = 0.5

Else 
pt.PivotFields(sField).Orientation = xlDataField
myshape.Fill.ForeColor.Brightness = 0

End If
End Sub
about 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda